<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <link rel="StyleSheet" href="../css/jpetstore.css" type="text/css" media="screen"/>
</head>
<body>
<header th:replace="common/top"></header>
<div id="Content">
<div id="BackLink">
    <a th:href="@{/catalog/viewCategory?categoryId=}+${product.categoryId}"><button type="button" class="btn btn-sm btn-primary" th:text="'Return to '+${product.categoryId}"></button></a>
</div>

<div id="Catalog">

    <h2 th:text="${product.name}">Product Name</h2>

    <table>
        <tr>
            <th>Item ID</th>
            <th>Product ID</th>
            <th>Description</th>
            <th>List Price</th>
            <th>&nbsp;</th>
        </tr>
        <tr th:each="item:${itemList}">
            <td><a th:href="@{/catalog/viewItem?itemId=}+${item.itemId}"><button type="button" class="btn btn-info" th:text="${item.itemId}">item Id</button></a></td>
            <td th:text="${item.product.productId}">productID</td>
            <td th:text="${item.attribute1}">Item Attributes</td>
            <td th:text="'$'+${#numbers.formatDecimal(item.listPrice,1,2)}">Item List Price</td>
            <td><a th:href="'/cart/addItemToCart?workingItemId='+${item.itemId}"><button type="button" class="btn btn-success">Add to Cart</button></a></td>
        </tr>
    </table>
</div>

</div>
<footer th:replace="common/bottom"></footer>
</body>
</html>





